package com.example.homework1;

import org.junit.jupiter.api.MethodOrderer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class helloController {

    @GetMapping("/random")
    public int random(){
        MethodOrderer.Random rand = new MethodOrderer.Random();
        int randomNum = rand.nextInt(1000);
        return randomNum;
    }


    @GetMapping("/square/{num}")
    public int square(int num){
        return num*num;
    }
}
